#include "Log.hpp"
#include "ThreadPool.hpp"
#include <memory>
#include "Task.hpp"

using namespace LogModule;
using namespace ThreadPoolModule;
int main()
{
   
    Enable_Console_Log_Strategy();
    //ThreadPool<task_t>* tp = new ThreadPool<task_t>;
    //tp->Start();
    

    int cnt = 10;
    sleep(2);
    while(cnt--)
    {
        //tp->Equeue(Download);
        ThreadPool<task_t>::GetInstStance()->Equeue(Download);
        sleep(1);
    }
    ThreadPool<task_t>::GetInstStance()->Stop();
    ThreadPool<task_t>::GetInstStance()->Join();


    
    // LOG(LogLevel::DEBUG) << "hello " << "kivotos";
    // sleep(1);
    // LOG(LogLevel::DEBUG) << "hello " << "kivotos";
    // sleep(1);
    // LOG(LogLevel::DEBUG) << "hello " << "kivotos";
    // sleep(1);
    // LOG(LogLevel::DEBUG) << "hello " << "kivotos";
    // sleep(1);
    
    return 0;
}